home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 44
/
Aminet 44 (2001)(GTI - Schatztruhe)[!][Aug 2001].iso
/
Aminet
/
dev
/
gui
/
gtlayout.lha
/
Source
/
LTP_Memory.c
< prev
next >
Wrap
C/C++ Source or Header
|
1999-01-02
|
735b
|
46 lines
/*
** GadTools layout toolkit
**
** Copyright © 1993-1999 by Olaf `Olsen' Barthel
** Freely distributable.
**
** :ts=4
*/
#ifndef _GTLAYOUT_GLOBAL_H
#include "gtlayout_global.h"
#endif
#include "Assert.h"
/*****************************************************************************/
APTR
LTP_Alloc(LayoutHandle *handle,ULONG amount)
{
APTR result;
if(amount > 0)
result = AsmAllocPooled(handle->Pool,amount,SysBase);
else
result = NULL;
if(!result)
handle->Failed = TRUE;
return(result);
}
/*****************************************************************************/
VOID
LTP_Free(LayoutHandle *handle,APTR mem,ULONG memsize)
{
if(mem && memsize > 0)
AsmFreePooled(handle->Pool,mem,memsize,SysBase);
}